﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HidesaburoDotNET.Core.AI;

namespace HidesaburoDotNET.Core
{
    public class PlayerMemento
    {
        Kawa kawa;

        public Kawa Kawa
        {
            get { return kawa; }
            set { kawa = value; }
        }
        Tehai tehai;

        public Tehai Tehai
        {
            get { return tehai; }
            set { tehai = value; }
        }
        AbstractAI ai;

        public AbstractAI AI
        {
            get { return ai; }
            set { ai = value; }
        }
        int score;

        public int Score
        {
            get { return score; }
            set { score = value; }
        }

        PlayerInfo info;

        public PlayerInfo Info
        {
            get { return info; }
            set { info = value; }
        }



        public PlayerMemento(Player player)
        {
            this.kawa = new Kawa(player.Kawa);
            this.tehai = new Tehai(player.Tehai);
            this.ai = player.AI.Clone() as AbstractAI;
            this.score = player.Score;
            this.info = player.Info;
            
        }

    }
    public class FieldMemento
    {
        List<PlayerMemento> playersMements;

        public List<PlayerMemento> PlayersMements
        {
            get { return playersMements; }
            set { playersMements = value; }
        }
        Yama yama;

        public Yama Yama
        {
            get { return yama; }
            set { yama = value; }
        }
        GameRule gameRule;

        public GameRule GameRule
        {
            get { return gameRule; }
            set { gameRule = value; }
        }
        Player activePlayer;

        public Player ActivePlayer
        {
            get { return activePlayer; }
            set { activePlayer = value; }
        }
        Player next;

        public Player Next
        {
            get { return next; }
            set { next = value; }
        }
        NakiAction action;

        public NakiAction Action
        {
            get { return action; }
            set { action = value; }
        }

        int kyoku;

        public int Kyoku
        {
            get { return kyoku; }
            set { kyoku = value; }
        }
        int renchan;

        public int Renchan
        {
            get { return renchan; }
            set { renchan = value; }
        }

        bool gaming;

        public bool Gaming
        {
            get { return gaming; }
            set { gaming = value; }
        }


        public FieldMemento()
        {
        }

    }
}
